-- GENERATED SPELL FOR [Shattered Hand Mage] --


function spell0_19413(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(14034,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19413', 3000, 1)
end

function spell1_19413(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_19413', 8267, 1)
end

function spell2_19413(pUnit, Event) --@Soul Burden,n/a--
pUnit:FullCastSpellOnTarget(38879,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19413', 603, 1)
end

function Sorts_19413(pUnit, Event)
local choix_sorts_19413 = math.random(0, 2)
if choix_sorts_19413 == 0 then
pUnit:RegisterEvent('spell0_19413', 1, 1)
end
if choix_sorts_19413 == 1 then
pUnit:RegisterEvent('spell1_19413', 1, 1)
end
if choix_sorts_19413 == 2 then
pUnit:RegisterEvent('spell2_19413', 1, 1)
end
end

function mob19413_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19413', math.random(1500, 3000), 1)
end

function mob19413_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19413_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19413_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19413, 1, 'mob19413_Action')
RegisterUnitEvent(19413, 2, 'mob19413_Leave')
RegisterUnitEvent(19413, 3, 'mob19413_Kill')
RegisterUnitEvent(19413, 4, 'mob19413_Die')
